A step-by-step beginner guide to reading real battery data from your rooted Android phone using Termux.
We need bc to do the health percentage math. Run this in Termux:
Android exposes battery data as files. First, list what power supply nodes exist on your device:
On the Mi 11X, the output looked like this:
battery folder gave "Permission denied" errors on this device. The correct path was bms — which stands for Battery Management System.This single command reads all battery metrics and calculates health. Copy and paste the whole thing:
sh -c, the cat commands run as a normal user before root kicks in — causing "Permission denied". Wrapping ensures everything runs as root.| Metric | My Value | What it means |
|---|---|---|
| charge_full | 4544000 µAh | Maximum charge your battery holds today = 4544 mAh (divide by 1000) |
| charge_full_design | 4520000 µAh | The original factory capacity = 4520 mAh. This is the reference for health % |
| capacity | 53% | Current charge level, like a fuel gauge. Was at 53% when command ran |
| voltage_now | 3846425 µV | Battery voltage = 3.85V. Normal range: 3.3V (empty) → 4.35V (full) |
| temp | 282 | Temperature in tenths of °C. So 282 ÷ 10 = 28.2°C. Safe range: <40°C |
| cycle_count | 257 | Number of full charge cycles completed. Batteries typically last 400–500 cycles before noticeable wear |
| Health % | 100.00% | (charge_full ÷ charge_full_design) × 100. Values >100% are normal for newer batteries |
| Health Range | Status | What to do |
|---|---|---|
| 95–100%+ | Excellent ✓ | Battery is like new. No action needed. |
| 85–94% | Good | Normal aging. Still performs well daily. |
| 70–84% | Fair | Noticeable battery drain. Consider usage habits. |
| Below 70% | Poor | Time to replace the battery. |
The default battery folder may be restricted even with root on some kernels. This was the exact issue on the Mi 11X.
Fix: Use the bms path instead. First list available nodes:
Then replace battery with bms in all commands.
The bc calculator isn't installed by default.
Or use awk as an alternative without installing anything:
This happens when you use su -c "echo $(cat ...)" — the subshell runs as normal user before root. Always wrap with sh -c '...' inside su.